package com.wuming.house.service;

import com.wuming.house.core.BusinessException;
import com.wuming.house.model.UserCollection;

import java.util.List;

public interface UserCollectionService {

    /**
     * 添加用户收藏信息
     *
     * @param collection 收藏信息
     * @throws BusinessException
     */
    void saveUserCollection(UserCollection collection) throws BusinessException;

    /**
     * 根据id删除收藏信息
     *
     * @param id 收藏id
     * @throws BusinessException
     */
    void removeUserCollectionById(Long id) throws BusinessException;

    /**
     * 根据用户id查询用户的收藏信息
     *
     * @param userId    用户id
     * @param houseId   房产id
     * @param houseType 房产类型
     * @return 用戶收藏信息
     * @throws BusinessException
     */
    List<UserCollection> getUserCollectionById(Long userId, Long houseId, Integer houseType) throws BusinessException;

    List<UserCollection> getUserCollectionByPage(Long userid,Integer houseType,int pageIndex,int pageSize);

    int getTotal(Long userid,Integer houseType);
}
